package com.rzico.sbl.ui.mine

import androidx.lifecycle.MutableLiveData
import com.lzy.okgo.model.HttpMethod
import com.rzico.sbl.model.BaseUrl
import com.rzico.sbl.viewmodel.CommonViewModel

class MineViewModel : CommonViewModel() {

    val mInfoEvent = MutableLiveData("{}")

    /**
     * 个人信息
     */
    fun mineInfo(isLoading: Boolean = false) =
        request(
            isLoadingBefore = isLoading,
            isLoadingAfter = isLoading,
            requestUrl = BaseUrl.mineInfo,
            requestMethod = HttpMethod.GET,
            onSuccess = { mInfoEvent.value = it }
        )

}